package com.daka.dao;

import com.daka.entity.GroupVolunteer;
import com.daka.mybatis.SQLMapper;
import com.daka.vo.db.ActivityCountVo;
import com.daka.vo.db.OrgCountVo;
import com.daka.vo.db.VolunteerTimeVo;
import com.daka.vo.response.statistics.GroupCountVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author beliveli on 2016/3/31 0031.
 */
@Repository(value = "organizationCountMapper")
@SQLMapper
public interface OrganizationCountMapper {
    OrgCountVo selectAll(@Param("onePass") String onePass);

    List<OrgCountVo> selectByMonth(int orgId);

    OrgCountVo selectIndexCount(@Param("orgId") int orgId, @Param("platformId") int platformId, @Param("jurisdiction") String jurisdiction);

    GroupCountVo selectGroupCount(@Param("orgId") int orgId, @Param("status") int status, @Param("client") int client,
                                  @Param("startDate") String startDate, @Param("endDate") String endDate,
                                  @Param("jurisdiction") String jurisdiction);

    List<ActivityCountVo> selectActivityYes(@Param("orgId") int orgId, @Param("status") int status, @Param("client") int client,
                                            @Param("startDate") String startDate, @Param("endDate") String endDate);

    List<Integer> selectActivityCountYes(@Param("orgId") int orgId, @Param("status") int status, @Param("client") int client,
                                         @Param("startDate") String startDate, @Param("endDate") String endDate);

    List<ActivityCountVo> selectActivity(@Param("orgId") int orgId, @Param("client") int client,
                                         @Param("startDate") String startDate, @Param("endDate") String endDate,
                                         @Param("jurisdiction") String jurisdiction);

    List<Integer> selectActivityCount(@Param("orgId") int orgId, @Param("client") int client, @Param("jurisdiction") String jurisdiction);

    VolunteerTimeVo selectTimeByVolunteer(@Param("groupIds") String groupIds);

    Integer selectVolunteerCount(@Param("groupIds") String groupIds, @Param("status") int status);

    List<GroupVolunteer> selectGroupVolunteer(@Param("groupIds") String groupIds, @Param("status") int status,
                                              @Param("startDate") String startDate, @Param("endDate") String endDate);

}
